/**
 * 所有错误
 */
export enum ERRORS {
    browserNotConnection = "浏览器插件未连接",
    requestTimeout= "请求超时",
    notSupportData = "不支持的数据",
    pleaseSelectWorkPath = "请选择工作目录",
    pleaseSelectTheDefaultLanguage = "请选择默认刷题语言",
    frequentRequests = "请求频繁"
}

export const isError = (error: any) => {
    return _ERRORS.indexOf(error) >= 0;
};

const _ERRORS = Object.values(ERRORS);